set(spice_cmdline_sources
  spice-cmdline.c
  spice-cmdline.h
  )
#
##
## spicy-stats and spicy-screenshot
##
#foreach exe : ['spicy-stats', 'spicy-screenshot']
#  executable(exe,
#             sources : spice_cmdline_sources + ['@0@.c'.format(exe)],
#             c_args : '-Wno-deprecated-declarations',
#             install : true,
#             dependencies : spice_client_glib_dep)
#endforeach

add_executable(spice-status
        ${spice_cmdline_sources}
        spicy-stats.c
)
target_link_libraries(spice-status
        PRIVATE
        spice-client-glib
)

#
##
## spicy
##
if (gtk)
        set(spicy_sources
                spicy.c
                spicy-connect.c
                spicy-connect.h
                )
        add_executable(spicy
            ${spicy_sources}
            ${spice_cmdline_sources}
            )
       target_compile_options(spicy
               PRIVATE
               -Wno-deprecated-declarations
           )
       target_link_libraries(spicy
               PRIVATE
                spice-client-gtk-3.0
               )

#
#  executable('spicy',
#             sources : spicy_sources + spice_cmdline_sources,
#             c_args : '-Wno-deprecated-declarations',
#             install : true,
#             dependencies : spice_client_gtk_dep)
endif()
